package factorydemo.abstractfactory;

public class Test {

    public static void main(String[] args) {
        ElectricalApplianceFactory electricalApplianceFactory = new HisenseFactory();
        AirConditioning airConditioning = electricalApplianceFactory.createAirConditioning();
        airConditioning.refrigeration();
        WashingMachine washingMachine = electricalApplianceFactory.createWashingMachine();
        washingMachine.wash();
        WaterHeater waterHeater = electricalApplianceFactory.createWaterHeater();
        waterHeater.boilWater();

        electricalApplianceFactory = new MideaFactory();
        WaterHeater waterHeater1 = electricalApplianceFactory.createWaterHeater();
        waterHeater1.boilWater();
        WashingMachine washingMachine1 = electricalApplianceFactory.createWashingMachine();
        washingMachine1.wash();
        AirConditioning airConditioning1 = electricalApplianceFactory.createAirConditioning();
        airConditioning1.refrigeration();
    }
}
